package com.aop.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtils {

    public static boolean isNumeric(String str){
        boolean flag = false;

        if(str.equals("") || str=="" || str==null){
            return false;
        }

        if(org.apache.commons.lang3.StringUtils.isNumeric(str)){
            return true;
        }

        Pattern pattern = Pattern.compile("[0-9]*");
        Matcher matcher = pattern.matcher(str);

        if(!matcher.matches()){
            return false;
        }

        return true;
    }
}
